import { sortBy } from 'lodash';

export interface FunctionItem {
  username: string,
  userId: string,
  avater?: string,
  email?: string,
  github?: string,
  weixin?: string,
  userToken?: any
  viewResource?: any
    id: string,
    title?: string,
    description?: string;
    redirectUrl?: string;
    pic?: string; 
    order: number;
}

export default function getLRUFunctionItem(): FunctionItem[] {
  const data: any[] = [
    {
      id: 2,
      title: 'GPT机器人',
      description: '该项目使用NextGPTWeb开源项目',
      redirectUrl: '/tools/gpt',
      pic: 'https://z1.ax1x.com/2023/12/05/pi6R1hR.png',
      order: 1
    },
    {
      id: 10,
      title: 'PDF工具',
      description: '这人很懒，没有对这个页面模块配置描述',
      redirectUrl: '/tools/pdf-tool',
      pic: 'https://z1.ax1x.com/2023/12/05/pi6R1hR.png',
      order: 2
    },
    {
      id: 3,
      title: 'Twine剧本转配置工具',
      description: '基于Twine设计的剧情故事策划文件，可直接导出html转为csv配置表',
      redirectUrl: '/tools/twine-tool',
      pic: 'https://z1.ax1x.com/2023/12/05/pi6RuBF.png',
      order: 2
    },
    {
      id: 1,
      title: 'AI文案助手',
      description: '文案生成工具',
      redirectUrl: '/tools/ai-doc',
      pic: 'https://s21.ax1x.com/2024/08/07/pkxBCo6.png',
      order: 3,
    }
  ]
  return sortBy(data, item => item.order);
}